package xyz.bali16.module.netdisk.utils;

import javax.servlet.http.HttpServletRequest;

/**
 * @author bali2 on 1/11/2021.
 * @version 1.0
 */
public class BrowserUtil {
    public static boolean isMSBrowser(HttpServletRequest request) {
        String[] IEBrowserSignals = {"MSIE", "Trident", "Edge"};
        String userAgent = request.getHeader("User-Agent");
        for (String signal : IEBrowserSignals) {
            if (userAgent.contains(signal)) {
                return true;
            }
        }
        return false;
    }
}
